package com.huixh.train.business.controller.web;

import com.huixh.train.business.req.DailyTrainTicketQueryReq;
import com.huixh.train.business.resp.DailyTrainTicketQueryResp;
import com.huixh.train.business.service.DailyTrainTicketService;
import com.huixh.train.common.resp.PageResult;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
* @author huixh
*/
@Validated
@Tag(name = "每日车票余票信息", description = "每日车票余票信息")
@RestController("webDailyTrainTicketController")
@RequestMapping("/dailyTrainTicket")
public class DailyTrainTicketController {
    @Resource
    private DailyTrainTicketService dailyTrainTicketService;

    @PostMapping("/quest-list")
    public PageResult<List<DailyTrainTicketQueryResp>> query(@RequestBody @Valid DailyTrainTicketQueryReq dailyTrainTicketQueryReq) {
        return dailyTrainTicketService.queryList(dailyTrainTicketQueryReq);
    }

}